package com.highstockings.configurer;

import com.highstockings.Interceptor.ContentInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by diablo13064 on 2018/4/4.
 */
@Configuration
public class WebArticleConfigurer extends WebMvcConfigurerAdapter {
    public void addInterceptors(InterceptorRegistry registry) {
        super.addInterceptors(registry);
        registry.addInterceptor(new ContentInterceptor()).addPathPatterns("/article/**")
                .excludePathPatterns("/article/update")
                .addPathPatterns("/article/delete")
                .excludePathPatterns("/article/change");
    }
}
